package com.integralPerformance.pojo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import lombok.Data;

/**
 * 业绩评分标准信息
 * 这是一个记录业绩积分相关的表格。
 * @TableName points_criteria
 */
@TableName(value ="points_criteria")
@Data
public class PointsCriteria implements Serializable {
    /**
     * 唯一标识符
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 业绩类型
     */
    private String performanceType;

    /**
     * 项目级别
     */
    private String projectLevel;

    /**
     * 项目类别
     */
    private String projectCategory;

    /**
     * 获得等级
     */
    private String gainLevel;

    /**
     * 获得评分
     */
    private BigDecimal rating;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        PointsCriteria other = (PointsCriteria) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getPerformanceType() == null ? other.getPerformanceType() == null : this.getPerformanceType().equals(other.getPerformanceType()))
            && (this.getProjectLevel() == null ? other.getProjectLevel() == null : this.getProjectLevel().equals(other.getProjectLevel()))
            && (this.getProjectCategory() == null ? other.getProjectCategory() == null : this.getProjectCategory().equals(other.getProjectCategory()))
            && (this.getGainLevel() == null ? other.getGainLevel() == null : this.getGainLevel().equals(other.getGainLevel()))
            && (this.getRating() == null ? other.getRating() == null : this.getRating().equals(other.getRating()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getPerformanceType() == null) ? 0 : getPerformanceType().hashCode());
        result = prime * result + ((getProjectLevel() == null) ? 0 : getProjectLevel().hashCode());
        result = prime * result + ((getProjectCategory() == null) ? 0 : getProjectCategory().hashCode());
        result = prime * result + ((getGainLevel() == null) ? 0 : getGainLevel().hashCode());
        result = prime * result + ((getRating() == null) ? 0 : getRating().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", performanceType=").append(performanceType);
        sb.append(", projectLevel=").append(projectLevel);
        sb.append(", projectCategory=").append(projectCategory);
        sb.append(", gainLevel=").append(gainLevel);
        sb.append(", rating=").append(rating);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}